package com.qixiaobao.nondirect.invoice.service;

import com.qixiaobao.nondirect.invoice.domain.dto.NonDirectInvoiceDTO;
import com.qixiaobao.nondirect.invoice.domain.vo.NonDirectBillVO;
import com.qixiaobao.nondirect.invoice.domain.vo.NonDirectWaitInvoiceChargeVO;
import com.qixiaobao.nondirect.invoice.domain.Bill;
import com.qixiaobao.nondirect.invoice.domain.domain.InvoiceFile;
import com.qixiaobao.system.domain.dto.ChargeDTO;

import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Description 开票账单 业务层
 * @Author yangxm
 * @Date 2025/7/4 16:13
 */
public interface IBillService {

    /**
     * @Description 非直投发票管理-待开票-开票操作
     * @Author yangxm
     * @Date 2025/7/4 16:21
     * @param bill
     * @return int
     */
    int makeInvoiceBill(Bill bill);

    /**
     * @Description 非直投发票管理-开票中列表
     * @Author yangxm
     * @Date 2025/7/4 16:21
     * @param nonDirectInvoiceDTO
     * @return java.util.List<com.qixiaobao.nondirect.invoice.domain.vo.NonDirectBillVO>
     */
    List<NonDirectBillVO> selectInvoicingList(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 非直投发票管理-开票中列表-开票金额
     * @Author yangxm
     * @Date 2025/7/4 16:21
     * @param nonDirectInvoiceDTO
     * @return java.math.BigDecimal
     */
    BigDecimal selectInvoicingTotal(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 非直投发票管理-开票中列表-导出
     * @Author yangxm
     * @Date 2025/7/4 16:21
     * @param nonDirectInvoiceDTO
     * @param response
     * @return void
     */
    void invoicingExport(NonDirectInvoiceDTO nonDirectInvoiceDTO, HttpServletResponse response);

    /**
     * @Description 更新备注
     * @Author yangxm
     * @Date 2025/7/4 16:21
     * @param nonDirectInvoiceDTO
     * @return int
     */
    int updateRemark(NonDirectInvoiceDTO nonDirectInvoiceDTO);


    /**
     * @Description 开票中 - 上传发票
     * @Author yangxm
     * @Date 2025/7/7 9:56
     * @param nonDirectInvoiceDTO
     * @return int
     */
    int uploadInvoicingFile(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 开票中 - 合并开票
     * @Author yangxm
     * @Date 2025/7/7 11:13
     * @param nonDirectInvoiceDTO
     * @return int
     */
    int uploadMergeInvoiceFile(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 开票中、待审核、已开票 - 费用详情
     * @Author yangxm
     * @Date 2025/7/7 13:57
     * @param chargeDTO
     * @return java.util.List<com.qixiaobao.nondirect.invoice.domain.vo.NonDirectWaitInvoiceChargeVO>
     */
    List<NonDirectWaitInvoiceChargeVO> selectChargeList(ChargeDTO chargeDTO);

    /**
     * @Description 待审核、已开票 - 列表
     * @Author yangxm
     * @Date 2025/7/7 13:57
     * @param nonDirectInvoiceDTO
     * @return java.util.List<com.qixiaobao.nondirect.invoice.domain.vo.NonDirectBillVO>
     */
    List<NonDirectBillVO> selectInvoiceList(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 待审核、已开票 - 列表 - 应开票金额、实际开票金额总计
     * @Author yangxm
     * @Date 2025/7/7 13:57
     * @param nonDirectInvoiceDTO
     * @return java.util.Map<java.lang.String,java.math.BigDecimal>
     */
    Map<String, BigDecimal> selectInvoiceTotal(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 待审核、已开票 - 列表 - 导出
     * @Author yangxm
     * @Date 2025/7/7 13:57
     * @param nonDirectInvoiceDTO
     * @param response
     * @return void
     */
    void invoiceExport(NonDirectInvoiceDTO nonDirectInvoiceDTO, HttpServletResponse response);

    /**
     * @Description 待审核、已开票 - 合并发票 - 开票详情
     * @Author yangxm
     * @Date 2025/7/7 15:56
     * @param nonDirectInvoiceDTO
     * @return java.util.List<com.qixiaobao.nondirect.invoice.domain.Bill>
     */
    List<Bill> selectBillMergeDetailList(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 待审核、已开票 - 发票文件
     * @Author yangxm
     * @Date 2025/7/7 16:04
     * @param nonDirectInvoiceDTO
     * @return java.util.List<com.qixiaobao.nondirect.invoice.domain.InvoiceFile>
     */
    List<InvoiceFile> selectInvoiceFileList(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 待审核 - 重新上传发票文件
     * @Author yangxm
     * @Date 2025/7/7 16:04
     * @param nonDirectInvoiceDTO
     * @return int
     */
    int reUploadInvoiceFile(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 已开票 - 根据筛选条件，下载发票文件，供应商简称必选
     * @Author yangxm
     * @Date 2025/7/7 16:40
     * @param nonDirectInvoiceDTO
     */
    void downloadInvoiceFile(NonDirectInvoiceDTO nonDirectInvoiceDTO);

    /**
     * @Description 待审核、已开票 - 发票 - 一键下载
     * @Author yangxm
     * @Date 2025/7/7 16:57
     * @param nonDirectInvoiceDTO
     * @param response
     */
    void invoiceFileDownload(NonDirectInvoiceDTO nonDirectInvoiceDTO, HttpServletResponse response);
}
